package com.dcy.redis.constant;

/**
 * REDIS常量
 *
 * @author Tango
 * @since 2020/11/26
 */
public interface RedisKeyPool {

    /*-------------------------- CACHE NAME -----------------------------*/
    /**
     * 按过期时间分配缓存命名空间
     */
    String CACHE_REDIS_TTL_NONE = "redis",
            CACHE_REDIS_TTL_1H = "redis_1h",
            CACHE_REDIS_TTL_1D = "redis_1d",
            CACHE_REDIS_TTL_7D = "redis_7d",
            CACHE_REDIS_TTL_30D = "redis_30d";

    /*-------------------------- 数据KEY -----------------------------*/

    /**
     * 存储用户权限
     */
    String REDIS_USER_MODULE_LIST_KEY = "user:module:resources:list:";
    /**
     * 用户信息
     */
    String REDIS_USER_INFO = "user:info:";
    /**
     * 高德
     */
    String REDIS_AMAP_POINTS = "amap:points";
    /**
     * 音视频未接记录
     */
    String REDIS_MISSED_CALL = "mediasoup:missed:";
    /**
     * app最新版本号
     */
    String REDIS_APP_VER_LATEST = "app:version:latest:";
    /**
     * app最低可用版本int值
     */
    String REDIS_APP_VER_MIN = "app:version:min:";






    /*-------------------------- 短信验证码KEY -----------------------------*/

    //登录
    String REDIS_SMS_LOGIN = "sms:user:login:";

    //绑定手机号
    String REDIS_SMS_BIND_PHONE = "sms:user:bind:";

    //改密码
    String REDIS_SMS_RESET_PASSWORD = "sms:user:reset:password:";

    //改用户名
    String REDIS_SMS_RESET_USERNAME = "sms:user:reset:username:";





    /*-------------------------- 锁 -----------------------------*/

    /**
     * 修改用户名 新增用户 key = userId
     */
    String LOCK_USER_MOD = "lock:user:mod";

    /**
     * 通勤 key = userId
     */
    String LOCK_COMMUTE_GET = "lock:commute:get";
    /**
     * 高德地图 增删
     */
    String LOCK_AMAP_MOD = "lock:amap:mod";
    /**
     * 通话记录缓存 增删 key = userId
     */
    String LOCK_MEDIASOUP_MOD = "lock:mediasoup:mod";
    /**
     * 推送标签绑定解绑 key = deviceId
     */
    String LOCK_PUSH_TAG_MOD = "lock:push:tag:mod";

}
